package com.ly.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ly.dao.BbookMapper;
import com.ly.entity.Bbook;
import com.ly.service.BbookService;

@Service(value = "bbookService")
public class BbookServiceImpl implements BbookService {

    @Autowired
    private BbookMapper<Bbook>bbookMapper;
    
    @Override
    public Integer insertSelective(Bbook bbook) throws Exception {
           return this.bbookMapper.insertSelective(bbook);
        }

    @Override
    public Integer insertBatch(List<Bbook> bbook) throws Exception {
           return this.bbookMapper.insertBatch(bbook) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.bbookMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.bbookMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Bbook bbook) {
           return this.bbookMapper.updateByPrimaryKeySelective(bbook);
    }

    @Override
    public Bbook findById(Object id) {
           return (Bbook) this.bbookMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Bbook> selectByCondition(Bbook bbook) {
           return (List<Bbook>) this.bbookMapper.selectByCondition(bbook);
    }

    @Override
    public Integer selectCountByCondition(Bbook bbook) {
           return  this.bbookMapper.selectCountByCondition(bbook);
    }

}
